package com.chaodev.base.service;

import com.github.pagehelper.PageInfo;
import com.chaodev.base.dto.ActivityArticleDto;
import com.chaodev.base.model.ActivityArticle;
import com.chaodev.base.model.ActivityNotice;
import org.springframework.dao.DataAccessException;

import java.util.Date;
import java.util.List;

/**
 * vcbase
 *
 * @author 95634
 * @描述
 * @date 2023/5/19 15:55
 **/
public interface ActivityArticleService {

    /**
     * 获取建言献策信息
     *
     * @param id
     * @return TbAdvice
     */
    ActivityArticle findDataById(String id);

    /**
     * 保存建言献策信息
     *
     * @param tbAdvice
     * @throws DataAccessException
     */
    void saveData(ActivityArticle tbAdvice) throws DataAccessException;

    /**
     * 新增建言献策信息
     *
     * @param tbAdvice
     * @throws DataAccessException
     */
    void insertData(ActivityArticle tbAdvice) throws DataAccessException;

    /**
     * 更新建言献策信息
     *
     * @param tbAdvice
     * @throws DataAccessException
     */
    void updateDataById(ActivityArticle tbAdvice) throws DataAccessException;

    /**
     * 删除建言献策信息
     *
     * @param id
     * @throws DataAccessException
     */
    void deleteDataById(String id) throws DataAccessException;

    /**
     * 查询列表
     *
     * @param tbAdvice
     * @return List
     */
    List<ActivityArticle> queryDataList(ActivityArticle tbAdvice);

    PageInfo<ActivityArticle> queryPageList(ActivityArticleDto dto);

    PageInfo<ActivityArticle> queryPageAllList(ActivityArticleDto dto);

    /**
     * 更新访问量
     *
     * @param tbAdvice
     */
    void updateVisitNum(ActivityArticle tbAdvice);

    /**
     * 获取我报名过的活动日程
     */
    List<ActivityNotice> getMySignUpSchedule(String userId, Date thisDay);
}
